{template '_header'}
<div class='page-heading'><h2>入口/分享设置</h2></div>
<form id="setform"  {ifp 'sign.set'}action="" method="post"{/if} class="form-horizontal form-validate" >

    <div class="form-group">
        <label class="col-sm-2 control-label">在个人中心显示</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <label class='radio radio-inline'><input type='radio' value='0' name='iscenter' {if empty($set['iscenter'])}checked{/if}  /> 关闭</label>
            <label class='radio radio-inline'><input type='radio' value='1' name='iscenter' {if !empty($set['iscenter'])}checked{/if} /> 显示</label>
            {else}
            <div class="form-control-static">{if !empty($set['iscenter'])}显示{else}关闭{/if}</div>
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">在积分商城显示</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <label class='radio radio-inline'><input type='radio' value='0' name='iscreditshop' {if empty($set['iscreditshop'])}checked{/if} /> 关闭</label>
            <label class='radio radio-inline'><input type='radio' value='1' name='iscreditshop' {if !empty($set['iscreditshop'])}checked{/if} /> 显示</label>
            {else}
            <div class="form-control-static">{if !empty($set['iscreditshop'])}显示{else}关闭{/if}</div>
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">分享地址</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <label class='radio radio-inline'><input type='radio' value='0' name='share' {if empty($set['share'])}checked{/if} /> 商城首页</label>
            <label class='radio radio-inline'><input type='radio' value='1' name='share' {if !empty($set['share'])}checked{/if} /> 签到页面</label>
            {else}
            <div class="form-control-static">{if !empty($set['share'])}签到页面{else}商城首页{/if}</div>
            {/if}
            <div class="help-block">选择分享地址，签到页面的分享信息读取下面的封面信息</div>
        </div>
    </div>

    <div class="form-group-title"></div>

    <div class="form-group">
        <label class="col-sm-2 control-label">直接链接</label>
        <div class="col-sm-9 col-xs-12">
            <p class='form-control-static'>
                <a href='javascript:;' class="js-clip" title='点击复制链接' data-url="{php echo mobileUrl('sign',null,true)}" >{php echo mobileUrl('sign',null,true)}</a>
                <span style="cursor: pointer;" data-toggle="popover" data-trigger="hover" data-html="true"
                      data-content="<img src='{$qrcode}' width='130' alt='链接二维码'>" data-placement="auto right">
                    <i class="glyphicon glyphicon-qrcode"></i>
                </span>
            </p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label must">关键词</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <input type='text' class='form-control' name='keyword' value="{$set['keyword']}" data-rule-required="true" />
            {else}
            <div class='form-control-static'>{$set['keyword']}</div>
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">封面标题</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <input type='text' class='form-control' name='title' value="{$set['title']}" />
            {else}
            <div class='form-control-static'>{$set['title']}</div>
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">封面图片</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            {php echo tpl_form_field_image('thumb',$set['thumb'])}
            {else}
            {if !empty($set['thumb'])}
            <div class='form-control-static'>
                <img src="{php echo tomedia($set['thumb'])}" style='width:100px;border:1px solid #ccc;padding:1px' />
            </div>
            {/if}
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">封面描述</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'sign.set'}
            <textarea name='desc' class='form-control'>{$set['desc']}</textarea>
            {else}
            <div class='form-control-static'>{$set['desc']}</div>
            {/if}
        </div>
    </div>

{ifp 'sign.set'}
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-9">
            <input type="submit" value="提交" class="btn btn-primary" />
        </div>
    </div>
{/if}

</form>

{template '_footer'}